package com.example.springboot.controller;


import com.example.springboot.entity.MockData;
import com.example.springboot.service.MockDataService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/mock")
public class MockDataController {

    @Autowired
    MockDataService mockDataService;

    @GetMapping("/list")
    public List<MockData> list() {
        List<MockData> data = mockDataService.list();
        return data;
    }

}